package com.pm.business.service.impl;

import java.util.List;
import com.pm.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.pm.business.mapper.CompeteEnterpriseGradeMapper;
import com.pm.business.domain.CompeteEnterpriseGrade;
import com.pm.business.service.ICompeteEnterpriseGradeService;

/**
 * 企业评价Service业务层处理
 * 
 * @author zxl
 * @date 2022-07-11
 */
@Service
public class CompeteEnterpriseGradeServiceImpl implements ICompeteEnterpriseGradeService 
{
    @Autowired
    private CompeteEnterpriseGradeMapper competeEnterpriseGradeMapper;

    /**
     * 查询企业评价
     * 
     * @param gradeId 企业评价主键
     * @return 企业评价
     */
    @Override
    public CompeteEnterpriseGrade selectCompeteEnterpriseGradeByGradeId(Long gradeId)
    {
        return competeEnterpriseGradeMapper.selectCompeteEnterpriseGradeByGradeId(gradeId);
    }

    /**
     * 查询企业评价列表
     * 
     * @param competeEnterpriseGrade 企业评价
     * @return 企业评价
     */
    @Override
    public List<CompeteEnterpriseGrade> selectCompeteEnterpriseGradeList(CompeteEnterpriseGrade competeEnterpriseGrade)
    {
        return competeEnterpriseGradeMapper.selectCompeteEnterpriseGradeList(competeEnterpriseGrade);
    }

    /**
     * 新增企业评价
     * 
     * @param competeEnterpriseGrade 企业评价
     * @return 结果
     */
    @Override
    public int insertCompeteEnterpriseGrade(CompeteEnterpriseGrade competeEnterpriseGrade)
    {
        competeEnterpriseGrade.setCreateTime(DateUtils.getNowDate());
        return competeEnterpriseGradeMapper.insertCompeteEnterpriseGrade(competeEnterpriseGrade);
    }

    /**
     * 修改企业评价
     * 
     * @param competeEnterpriseGrade 企业评价
     * @return 结果
     */
    @Override
    public int updateCompeteEnterpriseGrade(CompeteEnterpriseGrade competeEnterpriseGrade)
    {
        competeEnterpriseGrade.setUpdateTime(DateUtils.getNowDate());
        return competeEnterpriseGradeMapper.updateCompeteEnterpriseGrade(competeEnterpriseGrade);
    }

    /**
     * 批量删除企业评价
     * 
     * @param gradeIds 需要删除的企业评价主键
     * @return 结果
     */
    @Override
    public int deleteCompeteEnterpriseGradeByGradeIds(Long[] gradeIds)
    {
        return competeEnterpriseGradeMapper.deleteCompeteEnterpriseGradeByGradeIds(gradeIds);
    }

    /**
     * 删除企业评价信息
     * 
     * @param gradeId 企业评价主键
     * @return 结果
     */
    @Override
    public int deleteCompeteEnterpriseGradeByGradeId(Long gradeId)
    {
        return competeEnterpriseGradeMapper.deleteCompeteEnterpriseGradeByGradeId(gradeId);
    }
}
